package com.ruoyi.wms.domain.dto;

import java.math.BigDecimal;
import java.util.Date;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.DecimalMin;
import javax.validation.constraints.Size;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;

/**
 * 增加商品库存请求DTO
 * 
 * @author ruoyi
 * @date 2024-01-01
 */
@ApiModel("增加商品库存请求")
public class InventoryIncreaseRequest
{
    /** 租户ID */
    @ApiModelProperty(value = "租户ID", required = true, example = "1001")
    @NotNull(message = "租户ID不能为空")
    private Long tenantId;

    /** 货主ID */
    @ApiModelProperty(value = "货主ID", required = true, example = "2001")
    @NotNull(message = "货主ID不能为空")
    private Long ownerId;

    /** 仓库ID */
    @ApiModelProperty(value = "仓库ID", required = true, example = "3001")
    @NotNull(message = "仓库ID不能为空")
    private Long warehouseId;

    /** 库位ID */
    @ApiModelProperty(value = "库位ID，为空时使用默认库位", example = "4001")
    private Long locationId;

    /** 商品ID */
    @ApiModelProperty(value = "商品ID", required = true, example = "5001")
    @NotNull(message = "商品ID不能为空")
    private Long itemId;

    /** 供应商ID */
    @ApiModelProperty(value = "供应商ID", example = "6001")
    private Long supplierId;

    /** 批次号 */
    @ApiModelProperty(value = "批次号，最大50字符", example = "BATCH20240101001")
    @Size(max = 50, message = "批次号长度不能超过50个字符")
    private String batchNo;

    /** 容器号 */
    @ApiModelProperty(value = "容器号，最大50字符", example = "CONTAINER20240101001")
    @Size(max = 50, message = "容器号长度不能超过50个字符")
    private String containerNo;

    /** 生产日期 */
    @ApiModelProperty(value = "生产日期，格式：yyyy-MM-dd", example = "2024-01-01")
    @JsonFormat(pattern = "yyyy-MM-dd")
    private Date productionDate;

    /** 过期日期 */
    @ApiModelProperty(value = "过期日期，格式：yyyy-MM-dd", example = "2024-12-31")
    @JsonFormat(pattern = "yyyy-MM-dd")
    private Date expirationDate;

    /** 增加数量 */
    @ApiModelProperty(value = "增加数量，必须大于0，最多3位小数", required = true, example = "100.000")
    @NotNull(message = "增加数量不能为空")
    @DecimalMin(value = "0.001", message = "增加数量必须大于0")
    private BigDecimal increaseQty;

    /** 单位 */
    @ApiModelProperty(value = "单位，最大20字符", example = "PCS")
    @Size(max = 20, message = "单位长度不能超过20个字符")
    private String unit;

    /** 操作类型 */
    @ApiModelProperty(value = "操作类型，必须属于字典类型wms_operation_type的值范围", required = true, example = "RECEIPT")
    @NotNull(message = "操作类型不能为空")
    @Size(max = 50, message = "操作类型长度不能超过50个字符")
    private String operationType;

    /** 库存状态 */
    @ApiModelProperty(value = "库存状态，必须属于字典类型wms_inventory_status的值范围", required = true, example = "NORMAL")
    @NotNull(message = "库存状态不能为空")
    @Size(max = 50, message = "库存状态长度不能超过50个字符")
    private String inventoryStatus;

    /** 关联单据类型 */
    @ApiModelProperty(value = "关联单据类型，最大50字符", example = "RECEIPT_ORDER")
    @Size(max = 50, message = "关联单据类型长度不能超过50个字符")
    private String documentType;

    /** 关联单据号 */
    @ApiModelProperty(value = "关联单据号，最大100字符", example = "RO20240101001")
    @Size(max = 100, message = "关联单据号长度不能超过100个字符")
    private String documentNo;

    /** 操作原因 */
    @ApiModelProperty(value = "操作原因，最大500字符", example = "收货入库")
    @Size(max = 500, message = "操作原因长度不能超过500个字符")
    private String reason;

    /** 备注 */
    @ApiModelProperty(value = "备注，最大500字符", example = "正常收货")
    @Size(max = 500, message = "备注长度不能超过500个字符")
    private String remark;

    // Getter and Setter methods
    public Long getTenantId() {
        return tenantId;
    }

    public void setTenantId(Long tenantId) {
        this.tenantId = tenantId;
    }

    public Long getOwnerId() {
        return ownerId;
    }

    public void setOwnerId(Long ownerId) {
        this.ownerId = ownerId;
    }

    public Long getWarehouseId() {
        return warehouseId;
    }

    public void setWarehouseId(Long warehouseId) {
        this.warehouseId = warehouseId;
    }

    public Long getLocationId() {
        return locationId;
    }

    public void setLocationId(Long locationId) {
        this.locationId = locationId;
    }

    public Long getItemId() {
        return itemId;
    }

    public void setItemId(Long itemId) {
        this.itemId = itemId;
    }

    public Long getSupplierId() {
        return supplierId;
    }

    public void setSupplierId(Long supplierId) {
        this.supplierId = supplierId;
    }

    public String getBatchNo() {
        return batchNo;
    }

    public void setBatchNo(String batchNo) {
        this.batchNo = batchNo;
    }

    public String getContainerNo() {
        return containerNo;
    }

    public void setContainerNo(String containerNo) {
        this.containerNo = containerNo;
    }

    public Date getProductionDate() {
        return productionDate;
    }

    public void setProductionDate(Date productionDate) {
        this.productionDate = productionDate;
    }

    public Date getExpirationDate() {
        return expirationDate;
    }

    public void setExpirationDate(Date expirationDate) {
        this.expirationDate = expirationDate;
    }

    public BigDecimal getIncreaseQty() {
        return increaseQty;
    }

    public void setIncreaseQty(BigDecimal increaseQty) {
        this.increaseQty = increaseQty;
    }

    public String getUnit() {
        return unit;
    }

    public void setUnit(String unit) {
        this.unit = unit;
    }

    public String getOperationType() {
        return operationType;
    }

    public void setOperationType(String operationType) {
        this.operationType = operationType;
    }

    public String getInventoryStatus() {
        return inventoryStatus;
    }

    public void setInventoryStatus(String inventoryStatus) {
        this.inventoryStatus = inventoryStatus;
    }

    public String getDocumentType() {
        return documentType;
    }

    public void setDocumentType(String documentType) {
        this.documentType = documentType;
    }

    public String getDocumentNo() {
        return documentNo;
    }

    public void setDocumentNo(String documentNo) {
        this.documentNo = documentNo;
    }

    public String getReason() {
        return reason;
    }

    public void setReason(String reason) {
        this.reason = reason;
    }

    public String getRemark() {
        return remark;
    }

    public void setRemark(String remark) {
        this.remark = remark;
    }

    @Override
    public String toString() {
        return "InventoryIncreaseRequest{" +
                "tenantId=" + tenantId +
                ", ownerId=" + ownerId +
                ", warehouseId=" + warehouseId +
                ", locationId=" + locationId +
                ", itemId=" + itemId +
                ", supplierId=" + supplierId +
                ", batchNo='" + batchNo + '\'' +
                ", containerNo='" + containerNo + '\'' +
                ", productionDate=" + productionDate +
                ", expirationDate=" + expirationDate +
                ", increaseQty=" + increaseQty +
                ", unit='" + unit + '\'' +
                ", operationType='" + operationType + '\'' +
                ", inventoryStatus='" + inventoryStatus + '\'' +
                ", documentType='" + documentType + '\'' +
                ", documentNo='" + documentNo + '\'' +
                ", reason='" + reason + '\'' +
                ", remark='" + remark + '\'' +
                '}';
    }
}